﻿#region Using

using CommunicationLibrary.TransportData.Enums;

using GameLogic.External;

#endregion

namespace CommunicationLibrary.Converter
{
    public static class BuildingTypeConverter
    {
        public static BuildingTypeEnum Convert(BuildingType otherType)
        {
            switch (otherType)
            {
                case BuildingType.None:
                    return BuildingTypeEnum.None;

                case BuildingType.Barrack:
                    return BuildingTypeEnum.Barrack;

                case BuildingType.GoldMine:
                    return BuildingTypeEnum.GoldMine;

                case BuildingType.ResearchLab:
                    return BuildingTypeEnum.ResearchLab;

                default:
                    return BuildingTypeEnum.Castle;
            }
        }

        public static BuildingType Convert(BuildingTypeEnum otherType)
        {
            switch (otherType)
            {
                case BuildingTypeEnum.None:
                    return BuildingType.None;

                case BuildingTypeEnum.Barrack:
                    return BuildingType.Barrack;

                case BuildingTypeEnum.GoldMine:
                    return BuildingType.GoldMine;

                case BuildingTypeEnum.ResearchLab:
                    return BuildingType.ResearchLab;

                default:
                    return BuildingType.Castle;
            }
        }
    }
}